#include"Mystdio.h"
#include<unistd.h>
#include<stdio.h>
#define filename "log.txt"
int main()
{
  _FILE* fd=_fopen (filename,"a");
  if(fd==NULL)
  {
  //  perror("_fopen fail");
    return 1;
  }
  const char*msg="hello bai!\n";
  int cnt=5;
  while(cnt)
  {
    _fwrite(fd,msg,strlen(msg));
    sleep(1);
    cnt--;
  }
  _fclose(fd);


  return 0;
}
